package com.charging.controller.admin;


import com.charging.entity.ChargingPile;
import com.charging.entity.ChargingRecord;
import com.charging.entity.FaultReport;
import com.charging.service.RecordService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Controller
@RequestMapping("/admin/report")
public class ReportController {

    @Resource
    private RecordService recordService;

    // 列表页
    @GetMapping("/list")
    public String list(Model model) {
        List<ChargingRecord> recordsList = recordService.getAllRecords();
        model.addAttribute("recordsList", recordsList);
        return "admin/report/financial";
    }

}
